-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate salt-master to Ubuntu 22.04('Jammy') #331
Conversation
This commit uncomments out code that will migrate our salt-master to run using Ubuntu 22.04 codename 'jammy'.
In our previoius configuration, the salt master was running as root user. When migrating to salt latest 3006, the salt-master defaults to running as the salt user. To bypass permissions errors around loading `consul.py` and `ca.py`, this commit runs the salt-master as the root user as done previously before attempting to upgrade salt.
The `python-requests` and `python-msgpack` packages were not getting loaded for our salt-master because there was no condtion to match it's oscodename. This commit changes that.
This commit applies a condition for codename jammy to use the appropriate salt repository, updating the repo URL, path name, and GPG key for Ubuntu 22.04.
Adjust `consul` configuration for compatibility with Ubuntu 22.04 ('Jammy')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, this looks good and is working as expected!
Two questions. One (comment) is just tidiness and the other is probably best to nip in the bud now rather than get caught by it later.
Vagrantfile
Outdated
@@ -41,10 +41,10 @@ Vagrant.configure("2") do |config| | |||
|
|||
config.vm.define "salt-master" do |s_config| | |||
# Uncomment below to migrate salt-master to jammy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment necessary anymore?
This comment is no longer necessary, as the salt-master now runs on Ubuntu 22.04 codename "Jammy".
- this change reflects the GPG keyring name, and apt source file list in [Salt Install Guide]https://docs.saltproject.io/salt/install-guide/en/latest/topics/install-by-operating-system/ubuntu.html)
- this commit addresses the recommended approach for [apt-key deprecation in Ubunut 22.04](https://docs.saltproject.io/en/latest/ref/states/all/salt.states.pkgrepo.html)
- this commit addresses the reccomended approach for [apt-key deprecation in Ubunut 22.04](https://docs.saltproject.io/en/latest/ref/states/all/salt.states.pkgrepo.html)
- this commit addresses the reccomended approach for [apt-key deprecation in Ubunut 22.04](https://docs.saltproject.io/en/latest/ref/states/all/salt.states.pkgrepo.html)
- this commit addresses the reccomended approach for [apt-key deprecation in Ubunut 22.04](https://docs.saltproject.io/en/latest/ref/states/all/salt.states.pkgrepo.html)
This PR migrates our salt-master to run on Ubuntu 22.04, codename "Jammy."
In our previous configuration running salt 3004, the salt-master ran as the root user. In the latest release, the salt-master adds a "salt" user and group by default, and runs as the "salt" user. By adding
user: root
to out vagrantmaster.conf
file, we allow the salt-master to run as root, like we had previously done, and bypass permissions errors related to loadingca.py
andconsul.py
modules.This PR also conditionally updates our configuration to use the onedir packaging with codename "jammy" updating the repo URL, path names, and GPG key.
To verify this locally:
laptop:psf-salt user$ vagrant up salt-master
laptop:psf-salt user$ vagrant up loadbalancer
laptop:psf-salt user$ vagrant up hg
The traceback for the salt-master should show it running on jammy, but to further verify the upgrade:
laptop:psf-salt user$ vagrant ssh salt-master
lsb_release -a
Note:
apt-key
is deprecated with Ubuntu 22.04. The recommended approach is to configure-aptkey: False
to the package repo state, and setsigned-by
in the repo name.This PR is currently in a state where all packages are updated to use this recommended approach except for postgresql.
The current bug appears to happen when salt adds the postgresql gpg key to our designated
signed by file
, the file permissions are not set the_apt
user to read.To learn more about this bug, see #333.